<div class="panel panel-default">
    <div class="panel-body">
<h1><span class="glyphicon glyphicon-facetime-video"></span> Videos</h1>
        <?php
        if ($this->paginator) {
            ?>

            <table class="table table-hover">
                <thead>
                <th>Video Title</th>

                </thead>
                <tbody>
                    <?php
                    foreach ($this->paginator as $video) {
                        echo "<tr>";
                        echo "<td><button class='btn btn-link' data-toggle='modal' data-target='#" . $video['videoUrl'] . "'>" . $video['videoTitle'] . "</td>";

                        echo "</tr>";
                        ?>
                        <!-- Modal -->
                    <div class="modal fade" id="<?= $video['videoUrl'] ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                    <h4 class="modal-title" id="myModalLabel"><?= $video['videoTitle'] ?></h4>
                                </div>
                                <div class="modal-body">
                                    
                                    <div class="js-video widescreen">
                                        <iframe allowfullscreen="" src="http://www.youtube.com/embed/<?= $video['videoUrl'] ?>?showinfo=0&theme=light"
                                                frameborder="0"></iframe>
                                    </div>
                                     
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" autofocus="autofocus" data-dismiss="modal">Close</button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <?php
                }
                ?>
                </tbody>
            </table>

            <?php
            echo $this->paginationControl($this->paginator, 'sliding', 'pagination.phtml');
        } else {
            ?>
            <div>You do not have any videos</div>
        <?php } ?>
    </div>
</div>